const app = getApp()
Page({
    data:{
      height:0
    },
    onLoad(){
        wx.getSystemInfo({
            success: res => {
                this.setData({
                    height :  res.windowHeight /2
                })
            }
        })
    },
    selectWork(){
        let type = 1;
        this.select(type)
    },
    selectRecruit(){
        let type = 2;
        this.select(type)
    },
    select(type){
        app.axios('/type','POST',response=>{
            if (response){
                wx.switchTab({
                    url: '/pages/main/index'
                })
            }
        },{type})
    }
})
